package ui;


import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class Example01 {

	public static void main(String[] args) {
		
		JFrame frame = ExampleUtils.createFrame();
		
		//frame.getContentPane().setLayout(new BorderLayout());		//è il default
		
		JPanel panel1 = new JPanel();
		panel1.setBackground(Color.WHITE);
		frame.getContentPane().add(panel1);
		
		JPanel panel2 = new JPanel();
		panel2.setBackground(Color.RED);
		frame.getContentPane().add(panel2,BorderLayout.SOUTH);
		
		//panel1.setLayout(new FlowLayout());		//è il default
		
		JButton button1 = new JButton("Pulsante 1");
		panel1.add(button1);
		JButton button2 = new JButton("Pulsante 2");
		panel1.add(button2);
		
		frame.setVisible(true);
	}

	/**
	 * @deprecated Use {@link ExampleUtils#createFrame()} instead
	 */
	private static JFrame createFrame() {
		return ExampleUtils.createFrame();
	}
}
